/**
 * NSDate+GTExtension.h
 *
 * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy of the License 
 * at http://www.mozilla.org/MPL/
 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
 * either express or implied. See the License for the specific language governing rights and limitations 
 * under the License.
 *
 * The Original Code is gcast-toolbox4iphone.
 *
 * The Initial Developers of the Original Code is Giannandrea Castaldi.
 */
#import <Foundation/Foundation.h>

#ifndef NSDATE_GTEXTENSION_H
#define NSDATE_GTEXTENSION_H
#define SECONDS_IN_ONE_MINUTE 60.0
#define SECONDS_IN_ONE_HOUR 3600.0
#define SECONDS_IN_FOUR_HOURS 14400.0
#define SECONDS_IN_TWELVE_HOURS 43200.0
#define SECONDS_IN_ONE_DAY 86400.0
#define SECONDS_IN_ONE_WEEK 604800.0
#define SECONDS_IN_ONE_MONTH 2592000.0
#endif

@interface NSDate (GTExtension)
+ (NSDate*)today;
+ (NSDate*)tomorrow;
+ (NSDate*)hoursAhead:(NSInteger)numOfHours;
+ (NSDate*)hoursBehind:(NSInteger)numOfHours;
+ (NSDate*)daysAhead:(NSInteger)numOfDays;
+ (NSDate*)daysBehind:(NSInteger)numOfDays;
+ (NSDate*)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day;
+ (NSDate*)dateWithHour:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second;
+ (NSDate*)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day hour:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second;
+ (NSDate*)dateWithTimeFromSeconds:(NSTimeInterval)seconds;
+ (NSString*)stringFromTimeInterval:(NSTimeInterval)interval;
- (NSTimeInterval)timeInSeconds;
- (NSDate*)daysAhead:(NSInteger)numOfDays;
- (NSDate*)daysBehind:(NSInteger)numOfDays;
- (NSComparisonResult)compareOnlyYearMonthDay:(NSDate*)anotherDate;
- (NSComparisonResult)compareOnlyHourMinuteSecond:(NSDate*)anotherDate;
@property(readonly) NSInteger year;
@property(readonly) NSInteger month;
@property(readonly) NSInteger day;
@property(readonly) NSInteger hour;
@property(readonly) NSInteger minute;
@property(readonly) NSInteger second;
@end
